/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ec.edu.farmacia.interfaces;

import java.sql.Connection;
import java.sql.DriverManager;
import javax.swing.JOptionPane;

/**
 *
 * @author Servidor
 */
public class conexion {
  Connection connect=null;
    public Connection conectar()
    {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            connect = DriverManager.getConnection("jdbc:mysql://localhost/farmacia","root","");
            //JOptionPane.showMessageDialog(null, "coneccion satisfactoria");
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "error en la conexion intente de nuevo");
        }
        return connect;
        
    }  
      }